package com.bjtech.dao.ibatis;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;
import org.ssi.dao.impl.BaseDaoSqlMapImpl;

import com.bjtech.dao.HeatMeterInfoDao;
import com.bjtech.domain.HeatMeterInfo;

/**
 * @author wf
 *
 */
@Repository(value="heatMeterInfoDao")
public class SqlMapHeatMeterInfoDao extends BaseDaoSqlMapImpl<HeatMeterInfo> implements
		HeatMeterInfoDao {

	public Long selectheatMetaInfoByMeterNum(String meterNum) {
		return (Long) super.getSqlMapClientTemplate().queryForObject("selectheatMetaInfoByMeterNum",meterNum);
	}

	public Map selectTjParamForHeatMeter(Long heatMeterId) {
		Map tjParam = new HashMap();
		
		// 所属项目
		String projName = (String) super.getSqlMapClientTemplate()
				.queryForObject("selectProjNameInfo", heatMeterId);
		tjParam.put("projName", projName);
		// 所属小区
		String xqName = (String) super.getSqlMapClientTemplate()
				.queryForObject("selecXqNameInfo", heatMeterId);
		tjParam.put("xqName", xqName);
		// 所属楼栋
		String buildingName = (String) super.getSqlMapClientTemplate()
				.queryForObject("selectBudinglindNameInfo", heatMeterId);
		tjParam.put("buildingName", buildingName);
		
		
		return tjParam;
	}

}
